package main

import (
	"fmt"
	s "strings"
)

var p = fmt.Println

func main() {
	//字符串中是否包含
	p("contains:", s.Contains("test", "es"))
	//字符串中包含的个数
	p("Count:", s.Count("test", "t"))
	//前缀是还是是
	p("HasPrefix:", s.HasPrefix("test", "te"))
	//后缀是否是
	p("HasSuffix:", s.HasSuffix("test", "st"))
	//是第几个
	p("index:", s.Index("test", "e"))
	//连接字符串
	p("join", s.Join([]string{"a", "b"}, "-"))
	//把最后一个字母替换成
	p("Replace:", s.Replace("foot", "t", "o", -1))
	p("split:", s.Split("a-b-c-d", "-"))
}
